/**
 * Friction joint definition.
**/
public class b2FrictionJointDef extends b2JointDef {

	public b2FrictionJointDef()
	{
		type = b2JointType.e_frictionJoint;
		localAnchorA = new b2Vec2(0.0f, 0.0f);
		localAnchorB = new b2Vec2(0.0f, 0.0f);
		maxForce = 0.0f;
		maxTorque = 0.0f;
	}

	public void release() {
		localAnchorA.release();
		localAnchorB.release();
	}

	/// Initialize the bodies, anchors, axis, and reference angle using the world
	/// anchor and world axis.
	public void Initialize(b2Body bodyA, b2Body bodyB, b2Vec2 anchor) {
		jni_b2DistanceJointDef_GetLocalPoint(
			localAnchorA.address, bodyA.address, anchor.address,
			localAnchorB.address, bodyB.address, anchor.address
		);
	}

	/// The local anchor point relative to bodyA's origin.
	public b2Vec2 localAnchorA;

	/// The local anchor point relative to bodyB's origin.
	public b2Vec2 localAnchorB;

	/// The maximum friction force in N.
	public float maxForce;

	/// The maximum friction torque in N-m.
	public float maxTorque;
}
